//  @ Project : GagalPanen
//  @ File Name : movingcreature.hpp
//  @ Date : 3/9/2011
//  @ Author : Irvan, Denis
//
//


#if !defined(_MOVINGCREATURE_H)
#define _MOVINGCREATURE_H

#include "creature.hpp"
#include "direction.hpp"
#include "moveablemap.hpp"
#include "actiontype.hpp"

class MovingCreature : public Creature {
public:
  // normal constructor
  MovingCreature(GameInterface* game, Cell* cell);
  
  // load game constructor
  MovingCreature(GameInterface* game, std::ifstream& is);

  virtual void save(std::ofstream& os);

  virtual ~MovingCreature();

  virtual void resetPosition() = 0;
  bool canMove();
  Direction getDirection();
  void move();
  void setDirection(Direction dir);
  void turnLeft();
  void turnRight();
  void setLocation(Cell* new_location);
  void performAction(ActionType action);
private:
  Direction direction_;
  void checkRep();
};

#endif  //_MOVINGCREATURE_H
